import { Component, Prop, Vue } from 'vue-property-decorator'
import { State } from 'vuex-class'

@Component
export default class NavMenu extends Vue {
  @Prop() private menuList!: any
  @State private menu: any
  private get activeIndex () {
    return this.menu.activeIndex
  }

  private jumpTo (i: number, e: string) {
    this.$store.commit('SET_INDEX', i)
    this.$router.push(e)
  }
}
